//商品接口模块

//引入工具函数
import request from '@/utils/request'

// 获取分类列表
export const getCateListReq = params => {
  return request({
    method: 'get',
    url: '/goods/catelist',
    params,
  })
}

//修改分类
export const editCateReq = data => {
  return request({
    method: 'post',
    url: '/goods/editcate',
    data,
  })
}

// 添加分类
export const AddCateReq = data => {
  return request({
    method: 'post',
    url: '/goods/addcate',
    data,
  })
}

// 删除分类
export const delCateReq = params => {
  return request({
    method: 'get',
    url: '/goods/delcate',
    params,
  })
}
// 获取图片地址
export const GoodsAddReq = data => {
  return request({
    method: 'post',
    url: '/goods/add',
    data,
  })
}
// 修改商品
export const GoodsEditReq = data => {
  return request({
    method: 'post',
    url: '/goods/edit',
    data,
  })
}